package com.qingk.easyjava.datasource;

import java.sql.Connection;
import java.sql.SQLException;

import javax.sql.DataSource;

import com.qingk.easyjava.beanfactory.MyBean;

public class BeanDao {
	private DataSource dataSource;
	private String name;
	private MyBean mybean;
	
	public String getName() {
		return name;
	}

	public MyBean getMybean() {
		return mybean;
	}

	public void setMybean(MyBean mybean) {
		this.mybean = mybean;
	}

	public void setName(String name) {
		this.name = name;
	}

	public DataSource getDataSource() {
		return dataSource;
	}
	
	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}
	
	public Connection getConnection() throws SQLException {
		return dataSource.getConnection();
	}
}
